<div class="row" id="title">
  <!-- <div class="col-sm">
    <h1 translate lib="web">rpaworkflows</h1>
  </div> -->
  <div class="col-sm"></div>
  <div class="col-sm text-right">
    <em class="fas fa-cog fa-spin" ng-show="ctrl.loading==true"></em>
  </div>
</div>

<div ng-show="ctrl.errormessage != ''"" class=" alert alert-danger" role="alert">{{ctrl.errormessage}}</div>
<div class="row">
  <table id="table1" class="table table-striped" when-scrolled="ctrl.more()" style="width: 100%;">
    <thead class="thead-dark">
      <tr>
        <th ng-click="ctrl.ToggleOrder('projectandname')"><strong translate lib="web">projectandname</strong></th>
        <th ng-click="ctrl.ToggleOrder('_createdby')"><strong translate lib="web">who</strong></th>
        <th ng-click="ctrl.ToggleOrder('_modified')"><strong translate lib="web">updated</strong></th>
        <th class="w-200 h-40">Runs last 5 days</th>
        <th class="w-150"></th>
      </tr>
    </thead>
    <tbody>
      <tr ng-repeat="model in ctrl.models">
        <td><a style="color: inherit; text-decoration: inherit;" ng-href="#/RPAWorkflow/{{model._id}}">{{model.projectandname}}</a></td>
        <td>{{model._createdby}}</td>
        <td>
          <timesince ng-model="model._modified" />
        </td>
        <td class="w-200 h-40">
          <canvas ng-show="model.chart!=null" id="bar" class="model.chart-base" chart-type="model.chart.charttype"
            chart-data="model.chart.data" chart-labels="model.chart.labels" chart-series="model.chart.series"
            height="40px" width="200">
          </canvas>
          <span ng-show="model.chart== null">No data</span>
        </td>
        <td>
          <a ng-href="#/RPAWorkflow/{{model._id}}" ng-disabled="ctrl.loading==true" class="btn"><em
              class="fas fa-play-circle"></em></a>
          <a href ng-click="ctrl.Download(model)" ng-disabled="ctrl.loading==true" class="btn"><em
              class="fas fa-file-download"></em></a>


        </td>
      </tr>
    </tbody>
  </table>